package com.cx.mall.user.dao;

import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;
//@Repository
public interface IBaseDao<T> {
    /**
     * 添加数据
     * @param t
     * @throws
     */
    void insert(T t) throws Exception;
    /**
     * 修改数据
     * @param t
     */
    void update(T t) throws Exception;
    /**
     * 删除数据
     * @param id
     */
    void deleteById(Object id) throws Exception;
    /**
     * 按 Id 查询
     * @param id
     */
    T selectById(Object id) throws Exception;
    /**
     * 按条件查询
     * @param params
     * @return
     */
    T selectOne(Object... params) throws Exception;
    /**
     * 按条件查询
     * @param params
     * @return
     */
    List<T> selectList(Object... params) throws Exception;
}
